//
// Created by Zemon on 2024/10/31.
//

#ifndef CAR_TASK_CAN_RECEIVE_H
#define CAR_TASK_CAN_RECEIVE_H

#include "stdint.h"

/* CAN send and receive ID */
typedef enum
{
    CAN_CHASSIS_ALL_ID = 0x200,
    CAN_GIMBAL = 0x1FF,
    CAN_3508_L_ID = 0x201,
    CAN_3508_R_ID = 0x202,
    CAN_2006_H = 0x203,
    CAN_2006_store = 0x204,
    CAN_6020 = 0x205,
} can_msg_id_e;

//rm motor data
typedef struct
{
    uint16_t angle;
    int16_t speed_rpm;
    int16_t given_current;
    uint8_t temperate;
    int16_t last_angle;
    uint16_t offset_angle;
    int32_t round_cnt;
    int32_t total_angle;

} motor_measure_t;

extern void CAN_cmd_chassis(int16_t motor1, int16_t motor2);
extern void CAN_cmd_lift(int16_t motor3);
extern void CAN_cmd_store(int16_t motor4);
extern void CAN_cmd_pitch(int16_t motor);
#endif //CAR_TASK_CAN_RECEIVE_H
